<?php

namespace NuitInfo2013\MainBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class TopicType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('title')
            ->add('content')
            ->add('statut', 'checkbox', array(
                'label' =>'Requête ouverte ?',
                'required' => false))
        ;
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'NuitInfo2013\MainBundle\Entity\Topic'
        ));
    }

    public function getName()
    {
        return 'nuitinfo2013_mainbundle_topictype';
    }
}
